package com.weibo.util;


import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

import com.weibo.service.WeiboService;



/**
 * 每天晚上00：00开始采集程序
 * @author Administrator
 *
 */
public class SaomiaoPingceWeiboTimerTask extends TimerTask{
	 //定义组件  
    private Timer timer;  
    
    public  SaomiaoPingceWeiboTimerTask(){  
     	Calendar calendar = Calendar.getInstance();
       	calendar.set(Calendar.HOUR_OF_DAY,4);
       	calendar.set(Calendar.MINUTE, 30);
       	calendar.set(Calendar.SECOND, 00);
       	Date time = calendar.getTime();
       	
       	timer = new Timer();
       	timer.schedule(this, time); 
    	
    }  
    
    public void run() {  
    	WeiboService ws = new WeiboService();
    	ws.saomiaoPingce();
    }  	
    
    
    
    public static void main(String[] args) {  
        new SaomiaoPingceWeiboTimerTask();  
    }  
      
}
